$("#gridDanhSachNhanVien").jqGrid({        
   	url:'/quanlycongno/json/?func=getListCongNo',
	datatype: "json",
   	colNames:['Khách hàng', 'Công nợ' ,'Hạn cuối thanh toán','Địa chỉ', 'Điện thoại'],
   	colModel:[
   		{name:'tenKH',index:'tenKH', width:55,editable:false},
   		{name:'congNo',index:'congNo', width:90, editable:false, formatter:"number", summaryType:'sum'},
   		{name:'hanThanhToan',index:'hanThanhToan', width:90, editable:false},
   		{name:'diaChi',index:'diaChi', width:90, editable:false},
   		{name:'dienThoai',index:'dienThoai', width:90, editable:false}
   	],
   	rowNum:10,
   	rowList:[10,20,30],
   	pager: '#pDanhSachNhanVien',
   	sortname: 'tenKH',
    viewrecords: true,
    loadonce: false,
    sortorder: "desc",
	jsonReader: {
		repeatitems : false,
		id: "0"
	},
	caption: "Quản lý công nợ",
	width: '971',
    height: '100%'
});
jQuery("#gridDanhSachNhanVien").jqGrid('navGrid','#pDanhSachNhanVien',
									{
										edit:false,
										add:false,
										del:false
									});

$(document).ready(function() {
	$('#cbbKhachHang').change(function(){$("#gridDanhSachNhanVien").jqGrid().setGridParam({url : '/quanlycongno/json/?func=getListCongNo&maKH=' + $('#cbbKhachHang').val()}).trigger('reloadGrid')});
	$('#KeToan').addClass('Active');
    
});